const EventEmitter = require('events').EventEmitter;
const channel = new EventEmitter();
channel.on('join', (e) => {
    console.log('Welcome!', e);
});

channel.emit('join');
